package com.tangly.codeing.service;

import com.tangly.codeing.model.SysPrivilege;
import com.tangly.codeing.model.vo.SysPrivilegeVo;
import com.tangly.codeing.utils.PageInfo;
import com.tangly.codeing.utils.ReturnT;

import java.util.List;
import java.util.Set;

/**
 * 权限表
 * @author tangbing
 * @date 2019-05-11
 */
public interface SysPrivilegeService {

    /**
    * 新增
    */
    ReturnT<String> insert(SysPrivilege sysPrivilege);

    /**
    * 删除
    */
    ReturnT<String> delete(Long id);

    /**
    * 批量删除
    */
    ReturnT<String> batchDelete(List<String> ids);

    /**
    * 更新
    */
    ReturnT<String> update(SysPrivilege sysPrivilege);

    /**
    * Load查询
    */
    SysPrivilege load(Long id);

    /**
    * 分页查询
    */
    PageInfo pageList(PageInfo pageInfo);

    List<SysPrivilege> findAll();

    Set<String> findPrivilegeIdByRoleId(String roleId);

    List<SysPrivilegeVo> findAllRoot();

    List<SysPrivilege> findByRoleIds(List<Long> roleIds);
}
